﻿<UserControl x:Class="Silverlight.Sample.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
             xmlns:local="clr-namespace:Silverlight.Sample"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.DataContext>
            <local:ViewModel/>
        </Grid.DataContext>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="184"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Border Margin="10" Grid.Column="1" Child="{Binding ElementName=List, Path=SelectedItem.UISample}" BorderBrush="Green" BorderThickness="0">
            
        </Border>
        <Border BorderThickness="2">
            <ListBox x:Name="List" ItemsSource="{Binding Samples}" HorizontalAlignment="Stretch">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid HorizontalAlignment="Center" Width="150" Background="#205081">
                            <Border HorizontalAlignment="Center" Height="70">
                                <TextBlock Text="{Binding Name}" Foreground="White" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                            </Border>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Border>
    </Grid>
</UserControl>
